﻿using System;
using System.Collections.Generic;

using Model.Cms;
namespace IDAL.Cms
{
    /// <summary>
    /// 接口层，内容管理，下载资源管理
    /// </summary>
    public interface IResource
    {
        /// <summary>
        /// 新增资源
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        bool InsertResource(ResourceInfo info);

        /// <summary>
        /// 修改资源
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        bool UpdateResource(ResourceInfo info);

        /// <summary>
        /// 根据编号获取资源
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        ResourceInfo GetResourceByID(int id);

        /// <summary>
        /// 资源列表
        /// </summary>
        /// <param name="condition"></param>
        /// <returns></returns>
        IList<ResourceInfo> ListResource(ResourceCondition condition);

        /// <summary>
        /// 资源列表
        /// </summary>
        /// <param name="condition"></param>
        /// <param name="recordCount"></param>
        /// <returns></returns>
        IList<ResourceInfo> ListResource(ResourceCondition condition, out int recordCount);
    }
}
